<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<link rel="stylesheet" type="text/css" href="${basePath}/static/css/production.css?v1"/>
<form action="" id="form">
    <div class="body-main">
        <div class="poerate-box">
            <div class="form-label">
                <label>所属订单：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.scProductOrderNo}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>客户名称：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.customerName}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>签单商务：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.signUserName}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>来源事业部：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.signUserOrgName}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>签单产品：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.productName}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>当前产品生产阶段：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.latestEndNodeName}</p>
            </div>
        </div>
        <%--<c:if test="${map.scProductOrder.status eq 'SC_GENERAL_STATE_SCPROORDER_CODE9'}">
            <div class="poerate-box">
                <div class="form-label">
                    <label>申请类型：</label>
                </div>
                <div class="layui-inline">
                    <p class="layer-text">申请退单</p>
                </div>
            </div>
        </c:if>
        <c:if test="${map.scProductOrder.status eq 'SC_GENERAL_STATE_SCPROORDER_CODE10'}">
            <div class="poerate-box">
                <div class="form-label">
                    <label>申请类型：</label>
                </div>
                <div class="layui-inline">
                    <p class="layer-text">申请废单</p>
                </div>
            </div>
        </c:if>--%>
        <div class="poerate-box">
            <div class="form-label">
                <label>退单原因：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.abandonReason}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>退单备注：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.flowOperating.remarks}</p>
            </div>
        </div>
        <div class="line"></div>
        <div class="poerate-box">
            <div class="form-label">
                <label>当前审核人：</label>
            </div>
            <div class="layui-inline">
                <p class="layer-text">${map.scProductOrder.auditorName}</p>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label class="required">变更后审核人：</label>
            </div>
            <div class="layui-input-inline select2-inline">
                <select class="select-style" id="auditorId1" name="auditorId1" auditorUser-select-law>
                    <option value>请选择</option>
                </select>
            </div>
        </div>
        <div class="poerate-box">
            <div class="form-label">
                <label>备注：</label>
            </div>
            <div class="layui-inline">
                         <textarea class="textarea-style " placeholder="备注不超过500个字" name="remark" rows="4"
                                   maxlength="500"></textarea>
            </div>
        </div>
        <div class="line"></div>
    </div>
</form>
<script type="text/javascript"
        src="${basePath}/static/js/zzsc/production/sc_auditorUser.js?v=${version}"></script>
<script type="text/javascript"
        src="${basePath}/static/js/main-tabs.js?v=${version}"></script>
<script type="text/javascript">

    function updateAuditor(id) {
        var remark = $('[name="remark"]').val();
        var auditorId = $('#auditorId1').val();
        if (auditorId == null || "" == auditorId) {
            return DGG.Warning("请选择要变更的审核人");
        }
        DGG.Confire("确认变更审核人吗？", '变更审核人', function () {
            DGG.loading();
            $.ajax({
                url: sysInfo.basePath + '/zzsc/audit/update_auditor.do',
                data: {id: id, auditorId: auditorId, remark: remark},
                type: "POST",
                dataType: "json",
                success: function (obj) {
                    DGG.loading('close');
                    if (obj.code != 0) {
                        DGG.Errors(obj.msg)
                    } else {
                        DGG.Succeed('操作成功！');
                        setTimeout(function () {
                            layer.closeAll();
                        }, 1000);
                        dataTableReload();
                    }
                }
            });
        }, function () {

        });
    }
</script>
